{template '_header'}
<div class="page-header">
    当前位置：<span class="text-primary">添加商品分组</span>
</div>

<div class="page-content">
    <form action="./index.php" method="get" class="form-horizontal" role="form" id="form1">
        <input type="hidden" name="c" value="site" />
        <input type="hidden" name="a" value="entry" />
        <input type="hidden" name="m" value="mx_shop" />
        <input type="hidden" name="do" value="web" />
        <input type="hidden" name="r" value="store.goodsgroup" />
        <div class="page-toolbar">
            <div class="col-sm-6" >
                {ifp 'store.goodsgroup.add'}
                    <a class="btn btn-primary" href="{php echo webUrl('store/goodsgroup/detail');}">添加商品分组</a>
                {/if}
            </div>
            <div class="col-sm-6 pull-right">
                <div class="input-group">
                    <input type="text" class="input-sm form-control" name='keyword' value="{$_GPC['keyword']}" placeholder="商品组名称"> <span class="input-group-btn">

                        <button class="btn btn-primary" type="submit"> 搜索</button> </span>
                </div>

            </div>
        </div>
    </form>
    {if count($list)>0}
    <form action="" method="post" class="form-validate form-horizontal ">
        <div class="page-table-header">
            <input type="checkbox">
            <div class="btn-group">
                {ifp 'store.goodsgroup.delete'}
                <button class="btn btn-default btn-sm btn-operation dropdown-toggle" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{php echo webUrl('store/goodsgroup/delete')}">
                    <i class='icow icow-shanchu1'></i> 删除
                </button>
                {/if}
            </div>
        </div>
        <table class="table table-hover table-responsive">
            <thead>
            <tr>
                <th style="width:25px;"></th>
                <th style="">商品组名称</th>
                <th></th>
                <th style="width:250px;">商品数</th>
                <th style="width:115px;">操作</th>
            </tr>
            </thead>
            <tbody>
            {loop $list  $row}
            <tr>
                <td><input type='checkbox'   value="{$row['id']}"/></td>
                <td>{$row['name']}</td>
                <td></td>
                <td>{$row['goodscount']}</td>
                <td>
                    {ifp 'store.goodsgroup.edit'}
                    <a class='btn btn-default  btn-sm btn-op btn-operation' href="{php echo webUrl('store/goodsgroup/goods', array('id' => $row['id']))}">
                        <span data-toggle="tooltip" data-placement="top" title="" data-original-title="商品">
                                <i class='icow icow-goods'></i>
                        </span>
                    </a>
                    <a class="btn btn-default btn-sm btn-op btn-operation" href="{php echo webUrl('store/goodsgroup/detail',array('id'=>$row['id']));}">
                         <span data-toggle="tooltip" data-placement="top" title="" data-original-title="编辑">
                                <i class='icow icow-bianji2'></i>
                        </span>
                    </a>
                    {/if}
                    {ifp 'store.goodsgroup.delete'}
                    <a class="btn btn-default btn-sm btn-op btn-operation" data-toggle="ajaxRemove" href="{php echo webUrl('store/goodsgroup/delete',array('id'=>$row['id']));}" title="删除" data-confirm="确认删除此商品组吗？">
                         <span data-toggle="tooltip" data-placement="top" title="" data-original-title="删除">
                             <i class='icow icow-shanchu1'></i>
                        </span>
                    </a>
                    {/if}
                </td>
            </tr>
            {/loop}
            </tbody>
            <tfoot>
                <tr>
                    <td><input type="checkbox"></td>
                    <td>
                        <div class="btn-group">
                            {ifp 'store.goodsgroup.delete'}
                            <button class="btn btn-default btn-sm btn-operation dropdown-toggle" type="button" data-toggle='batch-remove' data-confirm="确认要删除?" data-href="{php echo webUrl('store/goodsgroup/delete')}">
                                <i class='icow icow-shanchu1'></i> 删除
                            </button>
                            {/if}
                        </div>
                    </td>
                    <td colspan="3" class="text-right">  {$pager}</td>
                </tr>
            </tfoot>
        </table>
    </form>
    {else}
    <div class='panel panel-default'>
        <div class='panel-body' style='text-align: center;padding:30px;'>
            暂时没有任何商品分组
        </div>
    </div>
    {/if}
</div>
{template '_footer'}